home *** CD-ROM | disk | FTP | other *** search
/ CyberMycha 2003 May / cmycha200305.iso / MutantStorm / setup_mutantstorm_demo.exe / {app} / script / robot_green.lua < prev    next >
Text File  |  2002-10-15  |  3KB  |  92 lines

  1.  
  2. -- leave me
  3.     local actor = ACTOR_preload()
  4. -- leave me
  5.  
  6.     -- default for this beastie
  7.     actor[cp_actor_name]        = "robot_green"
  8.     actor[cp_model_dir]            = "beasties"
  9.     actor[cp_model_name]        = "robo-g"
  10.  
  11.     actor[cp_hit_delay]            = 3.0
  12.  
  13.     actor[cp_move_type]            = cmt_track + cmt_anim_to_move + cmt_repelled
  14.  
  15.     actor[cp_actor_type]            = cat_robot
  16. --    actor[cp_i_collide_with_beasties]    = cat_player + cat_robot
  17. --    actor[cp_these_collide_with_me]        = cat_player + cat_bullet + cat_robot
  18. --    actor[cp_i_avoid_these_beasties]    = cat_block + cat_blocker + cat_robot
  19.  
  20.     actor[cp_i_am_repelled_by]        = cat_block + cat_blocker + cat_robot + cat_webblob
  21.     actor[cp_repel_dist]            = 4.0
  22.  
  23.     actor[cp_score]                = 100
  24.     actor[cp_bonus_seq_hit]        = 5
  25.     actor[cp_bonus_seq_score]    = 1000
  26.     actor[cp_hit_power]            = 5.0
  27.  
  28.     -- movement
  29.     actor[cp_move_speed_min]    = 0.4
  30.     actor[cp_move_speed_max]    = 0.8
  31.  
  32.     actor[cp_look_ahead_dist]        = 6.0
  33.     actor[cp_target_stop_dist]        = 10.0
  34.  
  35.     actor[cp_turn_lock_angle_inner]        = 85.0
  36.     actor[cp_turn_lock_angle_outer]        = 95.0
  37.     actor[cp_turn_speed_still]            = 3.0
  38.     actor[cp_turn_acceleration_still]    = 0.3
  39.     actor[cp_turn_inertia_still]        = 0.0
  40.     actor[cp_turn_speed_moving]            = 2.0
  41.     actor[cp_turn_acceleration_moving]    = 0.3
  42.     actor[cp_turn_inertia_moving]        = 0.0
  43.  
  44.     actor[cp_weight]                = 3.0
  45.     actor[cp_launch_scale_min]        = 32.5
  46.     actor[cp_launch_scale_max]        = 37.5
  47.  
  48.     actor[cp_health_percent]        = 1000.0
  49.  
  50.     actor[cp_launch_hue_shift] = color - 100
  51.  
  52. --    actor[cp_move_target]        = "robo-mom"
  53.  
  54. -- leave me
  55.     c_preload_model( actor )
  56. -- leave me
  57.  
  58.     c_set_random_anim( "blink", 65.0, 105.0, 0.0, 1.0 )
  59.     c_add_particle_to_anim( "emerge", "mainbody", "robo-g_emerge" )
  60.     c_add_particle_to_anim( "emerge", "mainbody", "robo-g_emergepad" )
  61.     c_add_particle_to_anim( "mutate", "mainbody", "robo-g-path_mutate" )
  62.  
  63.     c_set_random_anim( "sing", 100.0, 100.0, 0.0, 5.0 )    
  64.     c_add_sound_to_anim( "sing", "robo-sing2", 50 )    
  65.  
  66.  
  67.     c_set_use_anim_for( "move_forward", "walk", 95.0, 105.0 )
  68.  
  69.     c_add_sound_to_anim( "mutate", "robo-g_mutate" )
  70. --    c_add_sound_to_anim( "walk", "robo_step", 1 )
  71.     c_add_sound_to_anim( "emerge", "robo-g_emerge", 150 )
  72.     
  73.  
  74.     local seq = { 0.0 , 0.175}
  75.     c_set_use_explosion_for( "bye_bye", "robo_green", exp_no_align, 30.0, 0.0, 1000.0, 1300.0, seq )
  76.     c_add_sound_to_explosion( "robo_green", "explode", "robo-g_death" )
  77.     c_add_sound_to_event( "hit_active_bone", "robo_hit" )
  78.  
  79.     c_set_use_explosion_for( "bye_bye", "robo_green_flash", exp_no_align, 0.0, 0.5, 3000.0, 3000.0, {0.0} )
  80.     c_add_particle_to_explosion( "robo_green_flash", "explode", "", "robo-g_flash" )
  81.  
  82.  
  83. if cur_level_num > 102 then
  84.     -- new state
  85.     c_set_trigger_mutate( "robot_yellow", "beasties_time_alive", 2.0, 4.0, 1.0, 1.0, 35.0, 40.0 )
  86.     -- new state
  87.  
  88.     -- new state
  89. --    c_set_trigger_mutate( "robot_yellow", "track_beastie_dist_less_than", 10.0, 15.0, 1.0, 1.0, 35.0, 40.0 )
  90.     -- new state
  91. end
  92.